Integrand size = 31, antiderivative size = 527 \[ \int \frac {\csc (e+f x)}{(g \cos (e+f x))^{5/2} (a+b \sin (e+f x))} \, dx=-\frac {\arctan \left (\frac {\sqrt {g \cos (e+f x)}}{\sqrt {g}}\right )}{a f g^{5/2}}+\frac {b^{7/2} \arctan \left (\frac {\sqrt {b} \sqrt {g \cos (e+f x)}}{\sqrt [4]{-a^2+b^2} \sqrt {g}}\right )}{a \left (-a^2+b^2\right )^{7/4} f g^{5/2}}-\frac {\text {arctanh}\left (\frac {\sqrt {g \cos (e+f x)}}{\sqrt {g}}\right )}{a f g^{5/2}}+\frac {b^{7/2} \text {arctanh}\left (\frac {\sqrt {b} \sqrt {g \cos (e+f x)}}{\sqrt [4]{-a^2+b^2} \sqrt {g}}\right )}{a \left (-a^2+b^2\right )^{7/4} f g^{5/2}}+\frac {2}{3 a f g (g \cos (e+f x))^{3/2}}-\frac {2 b \sqrt {\cos (e+f x)} \operatorname {EllipticF}\left (\frac {1}{2} (e+f x),2\right )}{3 \left (a^2-b^2\right ) f g^2 \sqrt {g \cos (e+f x)}}+\frac {b^3 \sqrt {\cos (e+f x)} \operatorname {EllipticPi}\left (\frac {2 b}{b-\sqrt {-a^2+b^2}},\frac {1}{2} (e+f x),2\right )}{\left (a^2-b^2\right ) \left (a^2-b \left (b-\sqrt {-a^2+b^2}\right )\right ) f g^2 \sqrt {g \cos (e+f x)}}+\frac {b^3 \sqrt {\cos (e+f x)} \operatorname {EllipticPi}\left (\frac {2 b}{b+\sqrt {-a^2+b^2}},\frac {1}{2} (e+f x),2\right )}{\left (a^2-b^2\right ) \left (a^2-b \left (b+\sqrt {-a^2+b^2}\right )\right ) f g^2 \sqrt {g \cos (e+f x)}}+\frac {2 b (b-a \sin (e+f x))}{3 a \left (a^2-b^2\right ) f g (g \cos (e+f x))^{3/2}} \]
[Out]
Time = 0.94 (sec) , antiderivative size = 527, normalized size of antiderivative = 1.00, number of steps used = 21, number of rules used = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.516, Rules used = {2977, 2645, 331, 335, 218, 212, 209, 2775, 2946, 2721, 2720, 2781, 2886, 2884, 214, 211} \[ \int \frac {\csc (e+f x)}{(g \cos (e+f x))^{5/2} (a+b \sin (e+f x))} \, dx=\frac {b^{7/2} \arctan \left (\frac {\sqrt {b} \sqrt {g \cos (e+f x)}}{\sqrt {g} \sqrt [4]{b^2-a^2}}\right )}{a f g^{5/2} \left (b^2-a^2\right )^{7/4}}+\frac {b^{7/2} \text {arctanh}\left (\frac {\sqrt {b} \sqrt {g \cos (e+f x)}}{\sqrt {g} \sqrt [4]{b^2-a^2}}\right )}{a f g^{5/2} \left (b^2-a^2\right )^{7/4}}-\frac {2 b \sqrt {\cos (e+f x)} \operatorname {EllipticF}\left (\frac {1}{2} (e+f x),2\right )}{3 f g^2 \left (a^2-b^2\right ) \sqrt {g \cos (e+f x)}}+\frac {2 b (b-a \sin (e+f x))}{3 a f g \left (a^2-b^2\right ) (g \cos (e+f x))^{3/2}}+\frac {b^3 \sqrt {\cos (e+f x)} \operatorname {EllipticPi}\left (\frac {2 b}{b-\sqrt {b^2-a^2}},\frac {1}{2} (e+f x),2\right )}{f g^2 \left (a^2-b^2\right ) \left (a^2-b \left (b-\sqrt {b^2-a^2}\right )\right ) \sqrt {g \cos (e+f x)}}+\frac {b^3 \sqrt {\cos (e+f x)} \operatorname {EllipticPi}\left (\frac {2 b}{b+\sqrt {b^2-a^2}},\frac {1}{2} (e+f x),2\right )}{f g^2 \left (a^2-b^2\right ) \left (a^2-b \left (\sqrt {b^2-a^2}+b\right )\right ) \sqrt {g \cos (e+f x)}}-\frac {\arctan \left (\frac {\sqrt {g \cos (e+f x)}}{\sqrt {g}}\right )}{a f g^{5/2}}-\frac {\text {arctanh}\left (\frac {\sqrt {g \cos (e+f x)}}{\sqrt {g}}\right )}{a f g^{5/2}}+\frac {2}{3 a f g (g \cos (e+f x))^{3/2}} \]
[In]
[Out]
Rule 209
Rule 211
Rule 212
Rule 214
Rule 218
Rule 331
Rule 335
Rule 2645
Rule 2720
Rule 2721
Rule 2775
Rule 2781
Rule 2884
Rule 2886
Rule 2946
Rule 2977
Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {\csc (e+f x)}{a (g \cos (e+f x))^{5/2}}-\frac {b}{a (g \cos (e+f x))^{5/2} (a+b \sin (e+f x))}\right ) \, dx \\ & = \frac {\int \frac {\csc (e+f x)}{(g \cos (e+f x))^{5/2}} \, dx}{a}-\frac {b \int \frac {1}{(g \cos (e+f x))^{5/2} (a+b \sin (e+f x))} \, dx}{a} \\ & = \frac {2 b (b-a \sin (e+f x))}{3 a \left (a^2-b^2\right ) f g (g \cos (e+f x))^{3/2}}+\frac {(2 b) \int \frac {-\frac {a^2}{2}+\frac {3 b^2}{2}-\frac {1}{2} a b \sin (e+f x)}{\sqrt {g \cos (e+f x)} (a+b \sin (e+f x))} \, dx}{3 a \left (a^2-b^2\right ) g^2}-\frac {\text {Subst}\left (\int \frac {1}{x^{5/2} \left (1-\frac {x^2}{g^2}\right )} \, dx,x,g \cos (e+f x)\right )}{a f g} \\ & = \frac {2}{3 a f g (g \cos (e+f x))^{3/2}}+\frac {2 b (b-a \sin (e+f x))}{3 a \left (a^2-b^2\right ) f g (g \cos (e+f x))^{3/2}}-\frac {\text {Subst}\left (\int \frac {1}{\sqrt {x} \left (1-\frac {x^2}{g^2}\right )} \, dx,x,g \cos (e+f x)\right )}{a f g^3}-\frac {b \int \frac {1}{\sqrt {g \cos (e+f x)}} \, dx}{3 \left (a^2-b^2\right ) g^2}+\frac {b^3 \int \frac {1}{\sqrt {g \cos (e+f x)} (a+b \sin (e+f x))} \, dx}{a \left (a^2-b^2\right ) g^2} \\ & = \frac {2}{3 a f g (g \cos (e+f x))^{3/2}}+\frac {2 b (b-a \sin (e+f x))}{3 a \left (a^2-b^2\right ) f g (g \cos (e+f x))^{3/2}}-\frac {2 \text {Subst}\left (\int \frac {1}{1-\frac {x^4}{g^2}} \, dx,x,\sqrt {g \cos (e+f x)}\right )}{a f g^3}+\frac {b^3 \int \frac {1}{\sqrt {g \cos (e+f x)} \left (\sqrt {-a^2+b^2}-b \cos (e+f x)\right )} \, dx}{2 \left (-a^2+b^2\right )^{3/2} g^2}+\frac {b^3 \int \frac {1}{\sqrt {g \cos (e+f x)} \left (\sqrt {-a^2+b^2}+b \cos (e+f x)\right )} \, dx}{2 \left (-a^2+b^2\right )^{3/2} g^2}+\frac {b^4 \text {Subst}\left (\int \frac {1}{\sqrt {x} \left (\left (a^2-b^2\right ) g^2+b^2 x^2\right )} \, dx,x,g \cos (e+f x)\right )}{a \left (a^2-b^2\right ) f g}-\frac {\left (b \sqrt {\cos (e+f x)}\right ) \int \frac {1}{\sqrt {\cos (e+f x)}} \, dx}{3 \left (a^2-b^2\right ) g^2 \sqrt {g \cos (e+f x)}} \\ & = \frac {2}{3 a f g (g \cos (e+f x))^{3/2}}-\frac {2 b \sqrt {\cos (e+f x)} \operatorname {EllipticF}\left (\frac {1}{2} (e+f x),2\right )}{3 \left (a^2-b^2\right ) f g^2 \sqrt {g \cos (e+f x)}}+\frac {2 b (b-a \sin (e+f x))}{3 a \left (a^2-b^2\right ) f g (g \cos (e+f x))^{3/2}}-\frac {\text {Subst}\left (\int \frac {1}{g-x^2} \, dx,x,\sqrt {g \cos (e+f x)}\right )}{a f g^2}-\frac {\text {Subst}\left (\int \frac {1}{g+x^2} \, dx,x,\sqrt {g \cos (e+f x)}\right )}{a f g^2}+\frac {\left (2 b^4\right ) \text {Subst}\left (\int \frac {1}{\left (a^2-b^2\right ) g^2+b^2 x^4} \, dx,x,\sqrt {g \cos (e+f x)}\right )}{a \left (a^2-b^2\right ) f g}+\frac {\left (b^3 \sqrt {\cos (e+f x)}\right ) \int \frac {1}{\sqrt {\cos (e+f x)} \left (\sqrt {-a^2+b^2}-b \cos (e+f x)\right )} \, dx}{2 \left (-a^2+b^2\right )^{3/2} g^2 \sqrt {g \cos (e+f x)}}+\frac {\left (b^3 \sqrt {\cos (e+f x)}\right ) \int \frac {1}{\sqrt {\cos (e+f x)} \left (\sqrt {-a^2+b^2}+b \cos (e+f x)\right )} \, dx}{2 \left (-a^2+b^2\right )^{3/2} g^2 \sqrt {g \cos (e+f x)}} \\ & = -\frac {\arctan \left (\frac {\sqrt {g \cos (e+f x)}}{\sqrt {g}}\right )}{a f g^{5/2}}-\frac {\text {arctanh}\left (\frac {\sqrt {g \cos (e+f x)}}{\sqrt {g}}\right )}{a f g^{5/2}}+\frac {2}{3 a f g (g \cos (e+f x))^{3/2}}-\frac {2 b \sqrt {\cos (e+f x)} \operatorname {EllipticF}\left (\frac {1}{2} (e+f x),2\right )}{3 \left (a^2-b^2\right ) f g^2 \sqrt {g \cos (e+f x)}}-\frac {b^3 \sqrt {\cos (e+f x)} \operatorname {EllipticPi}\left (\frac {2 b}{b-\sqrt {-a^2+b^2}},\frac {1}{2} (e+f x),2\right )}{\left (-a^2+b^2\right )^{3/2} \left (b-\sqrt {-a^2+b^2}\right ) f g^2 \sqrt {g \cos (e+f x)}}+\frac {b^3 \sqrt {\cos (e+f x)} \operatorname {EllipticPi}\left (\frac {2 b}{b+\sqrt {-a^2+b^2}},\frac {1}{2} (e+f x),2\right )}{\left (-a^2+b^2\right )^{3/2} \left (b+\sqrt {-a^2+b^2}\right ) f g^2 \sqrt {g \cos (e+f x)}}+\frac {2 b (b-a \sin (e+f x))}{3 a \left (a^2-b^2\right ) f g (g \cos (e+f x))^{3/2}}+\frac {b^4 \text {Subst}\left (\int \frac {1}{\sqrt {-a^2+b^2} g-b x^2} \, dx,x,\sqrt {g \cos (e+f x)}\right )}{a \left (-a^2+b^2\right )^{3/2} f g^2}+\frac {b^4 \text {Subst}\left (\int \frac {1}{\sqrt {-a^2+b^2} g+b x^2} \, dx,x,\sqrt {g \cos (e+f x)}\right )}{a \left (-a^2+b^2\right )^{3/2} f g^2} \\ & = -\frac {\arctan \left (\frac {\sqrt {g \cos (e+f x)}}{\sqrt {g}}\right )}{a f g^{5/2}}+\frac {b^{7/2} \arctan \left (\frac {\sqrt {b} \sqrt {g \cos (e+f x)}}{\sqrt [4]{-a^2+b^2} \sqrt {g}}\right )}{a \left (-a^2+b^2\right )^{7/4} f g^{5/2}}-\frac {\text {arctanh}\left (\frac {\sqrt {g \cos (e+f x)}}{\sqrt {g}}\right )}{a f g^{5/2}}+\frac {b^{7/2} \text {arctanh}\left (\frac {\sqrt {b} \sqrt {g \cos (e+f x)}}{\sqrt [4]{-a^2+b^2} \sqrt {g}}\right )}{a \left (-a^2+b^2\right )^{7/4} f g^{5/2}}+\frac {2}{3 a f g (g \cos (e+f x))^{3/2}}-\frac {2 b \sqrt {\cos (e+f x)} \operatorname {EllipticF}\left (\frac {1}{2} (e+f x),2\right )}{3 \left (a^2-b^2\right ) f g^2 \sqrt {g \cos (e+f x)}}-\frac {b^3 \sqrt {\cos (e+f x)} \operatorname {EllipticPi}\left (\frac {2 b}{b-\sqrt {-a^2+b^2}},\frac {1}{2} (e+f x),2\right )}{\left (-a^2+b^2\right )^{3/2} \left (b-\sqrt {-a^2+b^2}\right ) f g^2 \sqrt {g \cos (e+f x)}}+\frac {b^3 \sqrt {\cos (e+f x)} \operatorname {EllipticPi}\left (\frac {2 b}{b+\sqrt {-a^2+b^2}},\frac {1}{2} (e+f x),2\right )}{\left (-a^2+b^2\right )^{3/2} \left (b+\sqrt {-a^2+b^2}\right ) f g^2 \sqrt {g \cos (e+f x)}}+\frac {2 b (b-a \sin (e+f x))}{3 a \left (a^2-b^2\right ) f g (g \cos (e+f x))^{3/2}} \\ \end{align*}
Result contains higher order function than in optimal. Order 6 vs. order 4 in optimal.
Time = 25.69 (sec) , antiderivative size = 2136, normalized size of antiderivative = 4.05 \[ \int \frac {\csc (e+f x)}{(g \cos (e+f x))^{5/2} (a+b \sin (e+f x))} \, dx=\text {Result too large to show} \]
[In]
[Out]
Time = 1.00 (sec) , antiderivative size = 652, normalized size of antiderivative = 1.24
method | result | size |
default | \(\frac {24 g^{\frac {3}{2}} \ln \left (\frac {2 \sqrt {-g}\, \sqrt {-2 g \left (\sin ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+g}-2 g}{\cos \left (\frac {f x}{2}+\frac {e}{2}\right )}\right ) \left (\sin ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )-12 \sqrt {-g}\, \ln \left (\frac {4 g \cos \left (\frac {f x}{2}+\frac {e}{2}\right )+2 \sqrt {g}\, \sqrt {-2 g \left (\sin ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+g}-2 g}{-1+\cos \left (\frac {f x}{2}+\frac {e}{2}\right )}\right ) \left (\sin ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right ) g -12 \sqrt {-g}\, \ln \left (-\frac {2 \left (2 g \cos \left (\frac {f x}{2}+\frac {e}{2}\right )-\sqrt {g}\, \sqrt {-2 g \left (\sin ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+g}+g \right )}{\cos \left (\frac {f x}{2}+\frac {e}{2}\right )+1}\right ) \left (\sin ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right ) g -24 g^{\frac {3}{2}} \ln \left (\frac {2 \sqrt {-g}\, \sqrt {-2 g \left (\sin ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+g}-2 g}{\cos \left (\frac {f x}{2}+\frac {e}{2}\right )}\right ) \left (\sin ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+12 \sqrt {-g}\, \ln \left (\frac {4 g \cos \left (\frac {f x}{2}+\frac {e}{2}\right )+2 \sqrt {g}\, \sqrt {-2 g \left (\sin ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+g}-2 g}{-1+\cos \left (\frac {f x}{2}+\frac {e}{2}\right )}\right ) \left (\sin ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right ) g +12 \sqrt {-g}\, \ln \left (-\frac {2 \left (2 g \cos \left (\frac {f x}{2}+\frac {e}{2}\right )-\sqrt {g}\, \sqrt {-2 g \left (\sin ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+g}+g \right )}{\cos \left (\frac {f x}{2}+\frac {e}{2}\right )+1}\right ) \left (\sin ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right ) g +6 \ln \left (\frac {2 \sqrt {-g}\, \sqrt {-2 g \left (\sin ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+g}-2 g}{\cos \left (\frac {f x}{2}+\frac {e}{2}\right )}\right ) g^{\frac {3}{2}}+4 \sqrt {-2 g \left (\sin ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+g}\, \sqrt {-g}\, \sqrt {g}-3 \ln \left (\frac {4 g \cos \left (\frac {f x}{2}+\frac {e}{2}\right )+2 \sqrt {g}\, \sqrt {-2 g \left (\sin ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+g}-2 g}{-1+\cos \left (\frac {f x}{2}+\frac {e}{2}\right )}\right ) g \sqrt {-g}-3 \ln \left (-\frac {2 \left (2 g \cos \left (\frac {f x}{2}+\frac {e}{2}\right )-\sqrt {g}\, \sqrt {-2 g \left (\sin ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+g}+g \right )}{\cos \left (\frac {f x}{2}+\frac {e}{2}\right )+1}\right ) g \sqrt {-g}}{6 a \,g^{\frac {7}{2}} \sqrt {-g}\, \left (4 \left (\sin ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )-4 \left (\sin ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+1\right ) f}\) | \(652\) |
[In]
[Out]
Timed out. \[ \int \frac {\csc (e+f x)}{(g \cos (e+f x))^{5/2} (a+b \sin (e+f x))} \, dx=\text {Timed out} \]
[In]
[Out]
Timed out. \[ \int \frac {\csc (e+f x)}{(g \cos (e+f x))^{5/2} (a+b \sin (e+f x))} \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int \frac {\csc (e+f x)}{(g \cos (e+f x))^{5/2} (a+b \sin (e+f x))} \, dx=\int { \frac {\csc \left (f x + e\right )}{\left (g \cos \left (f x + e\right )\right )^{\frac {5}{2}} {\left (b \sin \left (f x + e\right ) + a\right )}} \,d x } \]
[In]
[Out]
\[ \int \frac {\csc (e+f x)}{(g \cos (e+f x))^{5/2} (a+b \sin (e+f x))} \, dx=\int { \frac {\csc \left (f x + e\right )}{\left (g \cos \left (f x + e\right )\right )^{\frac {5}{2}} {\left (b \sin \left (f x + e\right ) + a\right )}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {\csc (e+f x)}{(g \cos (e+f x))^{5/2} (a+b \sin (e+f x))} \, dx=\int \frac {1}{\sin \left (e+f\,x\right )\,{\left (g\,\cos \left (e+f\,x\right )\right )}^{5/2}\,\left (a+b\,\sin \left (e+f\,x\right )\right )} \,d x \]
[In]
[Out]